Fixing asan error on mpmc queue#244
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
4984b71 to
e4dca9c
Compare
|
The created documentation from the pull request is available at: docu-html |
VukPavicRTRK
left a comment
There was a problem hiding this comment.
Nice fix for the ASan false positive. One thing to call out: CacheLinePaddedAtomic<T> preserves cache-line size but not cache-line alignment, so it weakens the original false-sharing guarantee provided by alignas(CacheLineSize). At minimum, the comments on m_head, m_tail, and m_stopped should be updated since they're no longer strictly "aligned on their own cache line."
So I have done a benchmark and seen that false sharing doesn't actually cause any performance drawbacks. I have committed the benchmark and made the members not aligned at all . |
1eeba65 to
3fb08cb
Compare
|
Please lnk corresponding issue/bug. |
Fixes the ASAN error with the
MPMCConcurrentQueueUsing manual padding instead of
alignasso that ASAN's fake stack can correctly.Setting the alignment on the class itself didn't fix the asan error as it would just set the alignment for the class itself.